class BrightkiteData < ActiveRecord::Base
  belongs_to :brightkite_crawl, :foreign_key => :crawl_id # foreign key - crawl_id
  
  def crawl
    brightkite_crawl
  end
  
  def crawl=(new_crawl)
    brightkite_crawl = new_crawl
  end
  
  @@trusts = {
    "first_name" => 0.85,
    "full_name" => 0.8,
    "last_name" => 0.8,
    "gender" => 0.8,
    "age" => 0.8
  }
  
  def trust_of(field)
    raise Exception.new "#{self.class} must define trust for #{field}" if !@@trusts.key? field
    @@trusts[field]
  end
end
